#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    double a;
    char c;
    cin >> a >> c;
    double ans = 0;
    ans = 20 + max((double)0, 1.0 * (ceil(a) - 1));
    if (c != 'y')
    {
        cout << ans;
    }
    else
    {
        cout << ans + 5;
    }
}
// 64 位输出请用 printf("%lld")